home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / Util / LogUtil.h < prev    next >
C/C++ Source or Header  |  1996-04-12  |  2KB  |  81 lines

  1. #pragma once
  2. /*****
  3.  *
  4.  *    LogUtil.c
  5.  *
  6.  *    Logging functions
  7.  *
  8.  *    This is a support file for "Grant's CGI Framework".
  9.  *    Please see the license agreement that accompanies the distribution package
  10.  *    for licensing details.
  11.  *
  12.  *    Copyright ©1995,1996 by Grant Neufeld
  13.  *    grant@acm.com
  14.  *    http://arpp.carleton.ca/grant/mac/grantscgi/
  15.  *
  16.  *****/
  17.  
  18. #include "MyConfiguration.h"
  19. #if kCompileWithLogSupport
  20.  
  21. #include "compiler_stuff.h"
  22.  
  23.  
  24. /***  CONSTANTS  ***/
  25.  
  26. #define kLogLinebreak            '\r'
  27. #define kLogLinebreakP            "\p\r"
  28.  
  29.  
  30. /***  FUNCTION PROTOTYPES  ***/
  31.  
  32.     OSErr    LogStartup                ( void );
  33.     OSErr    LogQuit                    ( void );
  34.     
  35.     OSErr    LogFileOpen                ( void );
  36.     OSErr    LogFileClose            ( void );
  37. p_export OSErr    LogFileFlush        ( void );
  38.     
  39.     /* coming soon? */
  40. //    OSErr    LogWindowOpen            ( void );
  41. //    OSErr    LogWindowClose            ( void );
  42.     
  43. p_export OSErr    LogString                ( const char * );
  44. p_export OSErr    LogStringP                ( const StringPtr );
  45. p_export OSErr    LogStringAndSeparator    ( const char *, char );
  46. p_export OSErr    LogStringAndSeparatorP    ( const StringPtr, char );
  47.     
  48. #if kCompileWithDebugLogging
  49.     p_export OSErr    LogStringDebug        ( const char * );
  50.     p_export OSErr    LogStringDebugP        ( const StringPtr );
  51. #else
  52.         #define LogStringDebug(s)    (noErr)
  53.         #define LogStringDebugP(s)    (noErr)
  54. #endif /* kCompileWithDebugLogging */
  55.  
  56.  
  57. /***  MACROS  ***/
  58.  
  59. #define LogStringBreak(a)    LogStringAndSeparator(a,kLogLinebreak)
  60. #define LogStringBreakP(a)    LogStringAndSeparatorP(a,kLogLinebreak)
  61.  
  62.  
  63. #else    /* if !kCompileWithLogSupport */
  64.  
  65. #define LogStartup(a)    (noErr)
  66. #define LogQuit(a)    (noErr)
  67. #define LogFileOpen(a)    (noErr)
  68. #define LogFileClose(a)    (noErr)
  69. #define LogFileFlush(a)    (noErr)
  70. #define LogString(a)    (noErr)
  71. #define LogStringP(a)    (noErr)
  72. #define LogStringAndSeparator(a)    (noErr)
  73. #define LogStringAndSeparatorP(a)    (noErr)
  74. #define LogStringDebug(s)    (noErr)
  75. #define LogStringDebugP(s)    (noErr)
  76. #define LogStringBreak(a)    (noErr)
  77. #define LogStringBreakP(a)    (noErr)
  78.     
  79. #endif /* kCompileWithLogSupport */
  80. /***  EOF  ***/
  81.